Mac/Linux serial: don't reset timeout as often to trigger fewer driver bugs.
Lowrance: add read support for v3 files.
WBT doc: update.
GlobalSat DG-100 GPS data logger download.
Copyright (C) 2007 Mirko Parthey, mirko.parthey@informatik.tu-chemnitz.de
- Copyright (C) 2005 Robert Lipe, robertlipe@usa.net
+ Copyright (C) 2005-2008 Robert Lipe, robertlipe@gpsbabel.org
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* TODO: Since we know how long the frame should be, we could try to
* read the rest of the frame at once using gbser_read_wait(). */
+#if 0
for (i = 7; i < frame_len; i++) {
buf[i] = dg100_recv_byte();
dg100_debug("", 0, 1, &buf[i]);
}
+#else
+ i = gbser_read_wait(serial_handle, &buf[7], frame_len - 7, 1000);
+ dg100_debug("", 0, frame_len - 7, &buf[7]);
+ if (i < frame_len - 7) {
+ fatal("Expected to read %d bytes, but got %d\n",
+ frame_len - 7, i);
+ }
+#endif
frame_start_seq = be_read16(buf + 0);
payload_len_field = be_read16(buf + 2);
vmin = want - h->inbuf_used;
vtime = (unsigned) time_left / 100;
}
- if ((rc = set_rx_timeout(h, vmin, vtime), rc < 0) ||
+ // The commented out call to set_rx_timeout here is totally
+ // legal by POSIX standards but does result in a flurry of
+ // of tcsetattrs that slightly tweak VMIN/VTIME while there
+ // is incoming data. This has been shown to trigger driver
+ // bugs in the Prolific drivers for Mac and in certain Linux
+ // kernels, thought the latter has since been fixed.
+ // So althogh removing this means that the timeout behaviour
+ // is actually different on POSIX and WIN32, it triggers
+ // fewer buts this way. 2/12/2008 RJL
+ if (/* (rc = set_rx_timeout(h, vmin, vtime), rc < 0) || */
(rc = read(h->fd, h->inbuf + h->inbuf_used,
want - h->inbuf_used), rc < 0)) {
return gbser_ERROR;
Access to Lowrance USR files.
Contributed to gpsbabel by Jason Rust (jrust at rustyparts.com)
- Copyright (C) 2005, 2006 Robert Lipe, robertlipe@usa.net
+ Copyright (C) 2005, 2006, 2007, 2008 Robert Lipe, robertlipe@usa.net
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static char *writeasicons;
static char *merge;
static char *seg_break;
+static int reading_version;
#define MYNAME "Lowrance USR"
if (global_opts.debug_level >= 1)
printf(MYNAME " parse_waypt: waypt_type = %d\n",waypt_type);
+ // Version 3 has an extra word in here that we don't know about.
+ if (reading_version >= 3) {
+ int junkword = gbfgetint32(file_in);
+ (void)junkword;
+ }
}
int i;
MajorVersion = gbfgetint16(file_in);
+ reading_version = MajorVersion;
MinorVersion = gbfgetint16(file_in);
if (global_opts.debug_level >= 1)
<para>File protocol for the <productname>Wintec WBT-200</productname>
-GPS data logger. This format reads the binary file format created
+and <productname>Wintec WBT-201</productname> (sometimes called the <productname> G-Rays 2</productname>)GPS data loggers. This format reads the binary file format created
by Wintec's Windows application.</para>
<para>
-<ulink url="http://www.semsons.com/wi3mugpsrebt.html">Wintec WBT-200 </ulink>
+<ulink url="http://www.semsons.com/wiwbmu3gpsre2.html">Wintec WBT-201 </ulink>
</para>
<example id="wbt-bin-on-macos">
<title>Command showing conversion of a Wintec binary file to GPX</title>
-<para>Serial download protocol for the <productname>Wintec WBT-200</productname> GPS data logger. Although untested it is expected that this will also support the WBT-100.</para>
+<para>Serial download protocol for the
+<productname>Wintec WBT-200</productname> and
+<productname>Wintec WBT-201</productname>
+GPS data loggers. Although untested it is expected that this will also support the WBT-100.</para>
<para>
-<ulink url="http://www.semsons.com/wi3mugpsrebt.html">Wintec WBT-200</ulink>
+<ulink url="http://www.semsons.com/wiwbmu3gpsre2.html">Wintec WBT-201</ulink>
</para>
<example id="wbt-on-macos">
<title>Command showing WBT-200 download and erase over Bluetooth on Mac OS X</title>
<para><userinput>gpsbabel -t -w -i wbt,erase -f /dev/cu.WBT200-SPPslave-1 -o gpx -F out.gpx</userinput></para>
</example>
-
+
+<para>
+Internally, this is actually a serial device that has a serial/USB adapter
+built into it. It uses the CP210x chip by Silicon labs. You will probably
+need a driver for this chip. The product ships with one for Windows.
+The Linux 210x driver seems to work fine. Mac users will need to download
+the <ulink url="http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/USB/en/mcu_vcp.htm">Mac driver for CP210x</ulink>.
+</para>
+
+<para>
+GPSBabel does not try to offer an interface to configure these units. That
+is left to the Windows software that comes with it or tools like the
+<ulink url="http://www.daria.co.uk/gps">WBT 201 Viewer</ulink> for Mac OS/X
+and Linux.
+</para>